package consts

const (
	// 正常状态
	U_NORMAL = "0"

	// 异常状态
	U_EXCEPTION = "1"

	// 用户封禁状态
	U_DISABLE = "1"

	U_DISABLE_LABEL = "停用"

	// 部门正常状态
	U_DEPT_NORMAL = "0"

	// 部门停用状态
	U_DEPT_DISABLE = "1"

	// 字典正常状态
	U_DICT_NORMAL = "0"

	// 是否为系统默认（是）
	U_YES = "Y"
	U_NO  = "N"

	// 是否菜单外链（是）
	U_YES_FRAME = 0

	// 是否菜单外链（否）
	U_NO_FRAME = 1

	// 菜单类型（目录）
	U_TYPE_DIR = "M"

	// 菜单类型（菜单）
	U_TYPE_MENU = "C"

	// 菜单类型（按钮）
	U_TYPE_BUTTON = "F"

	// Layout组件标识
	U_LAYOUT = "Layout"

	// ParentView组件标识
	U_PARENT_VIEW = "ParentView"

	// InnerLink组件标识
	U_INNER_LINK = "InnerLink"

	//数据范围（1：全部数据权限 2：自定数据权限 3：本部门数据权限 4：本部门及以下数据权限）
	Data_Scope_All            = "1"
	Data_Scope_Custom         = "2"
	Data_Scope_Dept           = "3"
	Data_Scope_Dept_And_Child = "4"
	Data_Scope_Self           = "5"

	// 校验是否唯一的返回标识
	U_UNIQUE     bool = true
	U_NOT_UNIQUE bool = false

	// 用户名长度限制
	U_USERNAME_MIN_LENGTH = 2
	U_USERNAME_MAX_LENGTH = 20

	// 密码长度限制
	U_PASSWORD_MIN_LENGTH = 5
	U_PASSWORD_MAX_LENGTH = 20

	U_Sex_Male   = "0"
	U_Sex_Female = "1"
	U_Sex_Secret = "2"

	U_Sex_Male_Label   = "男"
	U_Sex_Female_Label = "女"
	U_Sex_Secret_Label = "未知"
)

const (
	Excel_Sheet_User          = "用户数据"
	Excel_Export_User         = "用户列表_%d.xlsx"
	Excel_Export_UserTemplate = "用户模板_%d.xlsx"

	Excel_Sheet_Role  = "角色数据"
	Excel_Export_Role = "角色列表_%d.xlsx"

	Excel_Sheet_Post  = "岗位数据"
	Excel_Export_Post = "岗位列表_%d.xlsx"

	Excel_Sheet_DictData  = "字典数据"
	Excel_Export_DictData = "字典数据列表_%d.xlsx"

	Excel_Sheet_DictType  = "字典类型"
	Excel_Export_DictType = "字典类型列表_%d.xlsx"

	Excel_Sheet_Config  = "参数配置"
	Excel_Export_Config = "参数配置列表_%d.xlsx"

	Excel_Sheet_LoginInfo  = "登录日志"
	Excel_Export_LoginInfo = "登录日志列表_%d.xlsx"

	Excel_Sheet_OperLog  = "操作日志"
	Excel_Export_OperLog = "操作日志列表_%d.xlsx"
)

type BusinessType int

const (
	/**
	 * 其它
	 */
	BusinessType_OTHER BusinessType = 0

	/**
	 * 新增
	 */
	BusinessType_INSERT BusinessType = 1

	/**
	 * 修改
	 */
	BusinessType_UPDATE BusinessType = 2

	/**
	 * 删除
	 */
	BusinessType_DELETE BusinessType = 3

	/**
	 * 授权
	 */
	BusinessType_GRANT BusinessType = 4

	/**
	 * 导出
	 */
	BusinessType_EXPORT BusinessType = 5

	/**
	 * 导入
	 */
	BusinessType_IMPORT BusinessType = 6

	/**
	 * 强退
	 */
	BusinessType_FORCE BusinessType = 7

	/**
	 * 生成代码
	 */
	BusinessType_GENCODE BusinessType = 8

	/**
	 * 清空数据
	 */
	BusinessType_CLEAN BusinessType = 9
)

type OperatorType int

const (
	/**
	 * 其它
	 */
	OperatorType_OTHER OperatorType = 0

	/**
	 * 后台用户
	 */
	OperatorType_MANAGE OperatorType = 1

	/**
	 * 手机端用户
	 */
	OperatorType_MOBILE OperatorType = 2
)
